import dataLink from './dataLink';
import sysJson from './sysJson';


//登录
let userLoginInterface = sysJson.dataUrl + "userLogin.do";

//查找登录页面的角色数据词典
let findOrgDataDicListInterface = sysJson.dataUrl +"user/dataDic/findOrgDataDicList.do";

//修改密码
let modifyPwdInterface = sysJson.dataUrl + "user/dataDic/modifyPwd.do";

//前端列表接口地址
let findwriteInterface = sysJson.dataUrl1+ "information/Infohtml/findInfoList.do"; 
// 增加/修改信息：
let updateFrontInfoInterface = sysJson.dataUrl+"information/Infohtml/updateFrontInfo.do"
// 删除信息：
let deleteInfoInterface = sysJson.dataUrl + "information/Infohtml/deleteInfo.do"
// 查询信息列表：
let findFrontInfoTempListInterface = sysJson.dataUrl +"information/Infohtml/findFrontInfoTempList.do"
// 查询信息详情
let findFrontTempInfoInterface = sysJson.dataUrl + "information/Infohtml/findFrontTempInfo.do"
//上传图片
let uploadFileOneInterface = sysJson.dataUrl+"system/enclosure/uploadFileOne.do"
//查看图片
// let findimgfileInterface = sysJson.dataUrl + "system/enclosure/findimgfile.do"

//查找栏目列表
let findColumnListInterface = sysJson.dataUrl + "column/manageColumn/findColumnList.do"

//查找个人菜单列表
let findPeopleMenuListInterface = sysJson.dataUrl + "user/menu/findPeopleMenuList.do"

//上传图片
let plUploadFileInterface = sysJson.dataUrl + "system/enclosure/plUploadFile.do"

//加1接口
let clickAddOneInterface = sysJson.dataUrl +"information/Infohtml/clickAddOne.do"

//错题集
let findInfoTempListByClassidInterface = sysJson.dataUrl + "information/Infohtml/findFrontInfoTempListByClassid.do"

//答题点击确定
let correctingtestInterface = sysJson.dataUrl + "answer/correctingtest.do"
//答题点击提交
let countscoreInterface = sysJson.dataUrl + "/answer/countscore.do"
//答案提交评价
let countgradeInterface = sysJson.dataUrl + "/answer/countgrade.do"
//条件列表
let ConditionlistInterface = sysJson.dataUrl + "/conditionList/getData.do"
//获取条件
let getConditionInterface = sysJson.dataUrl + "conditionList/getCondition.do"
//findFileInfoInterface
//查找文件信息
let findFileInfoInterface = sysJson.dataUrl + "system/enclosure/findFileInfor.do"
// =========================================================================

//登录
function userLogin(params, callback, err) {
  dataLink.dataLinkPostJson(userLoginInterface, params, callback, err)
}

//查找登录页面的角色数据词典
function findOrgDataDicList(params, callback, err) {
  dataLink.dataLinkPostJson(findOrgDataDicListInterface, params, callback, err)
}

//修改密码
function modifyPwd(params, callback, err) {
  dataLink.dataLinkPostJson(modifyPwdInterface, params, callback, err)
}


//获取前端列表
function findInfoList(params, callback, err){
  dataLink.dataLinkPostJson(findwriteInterface,params,callback,err)
}

//获取写字列表
function findwrite(params, callback, err) {
  dataLink.dataLinkPostJson(findwriteInterface, params, callback, err)
}

//增加/修改信息：
function updateFrontInfo(params, callback, err) {
  dataLink.dataLinkPostJson(updateFrontInfoInterface, params, callback, err)
}

// 删除信息：
function deleteInfo(params, callback, err) {
  dataLink.dataLinkPostJson(deleteInfoInterface, params, callback, err)
}

// 查询信息列表：
function findFrontInfoTempList(params, callback, err) {
  dataLink.dataLinkPostJson(findFrontInfoTempListInterface, params, callback, err)
}

// 查询信息详情
function findFrontTempInfo(params, callback, err) {
  dataLink.dataLinkPostJson(findFrontTempInfoInterface, params, callback, err)
}

// 上传图片
function uploadFileOne(params, callback, err) {
  dataLink.dataLinkPostJson(uploadFileOneInterface, params, callback, err)
}

// 查看图片
// function findimgfile(params, callback, err) {
//   dataLink.dataLinkPostJson(findimgfileInterface, params, callback, err)
// }

//查找栏目列表
function findColumnList(params, callback, err) {
  dataLink.dataLinkPostJson(findColumnListInterface, params, callback, err)
}

//查找个人菜单列表
function findPeopleMenuList(params, callback, err) {
  dataLink.dataLinkPostJson(findPeopleMenuListInterface, params, callback, err)
}

//上传图片
function plUploadFile(params, callback, err) {
  dataLink.dataLinkPostJson(plUploadFileInterface, params, callback, err)
}

//加一接口
function clickAddOne(params, callback, err) {
  dataLink.dataLinkPostJson(clickAddOneInterface, params, callback, err)
}

function findInfoTempListByClassid(params, callback, err) {
  dataLink.dataLinkPostJson(findInfoTempListByClassidInterface, params, callback, err)
}

//答题点击确定
function correctingtest(params, callback, err) {
  dataLink.dataLinkPostJson(correctingtestInterface, params, callback, err)
}
//答题点击提交
function countscore(params, callback, err) {
  dataLink.dataLinkPostJson(countscoreInterface, params, callback, err)
}
//答题提交评价
function countgrade(params, callback, err) {
  dataLink.dataLinkPostJson(countgradeInterface, params, callback, err)
}
//条件列表
function Conditionlist(params, callback, err) {
  dataLink.dataLinkPostJson(ConditionlistInterface, params, callback, err)
}
//获取条件
function getCondition(params, callback, err) {
  dataLink.dataLinkPostJson(getConditionInterface, params, callback, err)
}
//查找文件信息
function findFileInfo(params, callback, err) {
  dataLink.dataLinkPostJson(findFileInfoInterface, params, callback, err)
}

module.exports = {
  userLogin: userLogin,
  findOrgDataDicList: findOrgDataDicList,
  modifyPwd: modifyPwd,
  findInfoList: findInfoList,
  findwrite: findwrite,  
  updateFrontInfo: updateFrontInfo,
  deleteInfo: deleteInfo,
  findFrontInfoTempList: findFrontInfoTempList,
  findFrontTempInfo: findFrontTempInfo,
  uploadFileOne: uploadFileOne,
  findColumnList: findColumnList,
  findPeopleMenuList: findPeopleMenuList,
  plUploadFile: plUploadFile,
  clickAddOne: clickAddOne,
  findInfoTempListByClassid: findInfoTempListByClassid,
  correctingtest: correctingtest,
  countscore: countscore,
  countgrade: countgrade,
  Conditionlist: Conditionlist,
  getCondition: getCondition,
  findFileInfo:findFileInfo
}